<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<style type="text/css">
.ui-layout-north {
	z-index: 20 !important;
	overflow: visible !important;;
}

.ui-layout-north .ui-layout-unit-content {
	overflow: visible !important;
}

.ui-widget {
	font-size: 9px !important;
}

.size {
	width: 750px;
	position: relative;
	left: 18%;
	top: 10%;
}

.centro {
	top: 50%
}

.tabela {
	width: 750px;
}
</style>

	<title>Atendimento</title>
</h:head>

<h:body>
	<ui:decorate template="/templateBase.xhtml">
		<ui:define name="center">
			<p:growl life="3000" id="growl" />
			<h:form id="formAtendimento">
				<br />
				<br />
				<br />
				<p:panel header="Atendimento" styleClass="size"
					footer="SAIES - Sistema de Avaliação Institucional do Ensino Superior">
					<br />
					<p:tabView>
						<p:tab title="Protocolo de Atendimento">
							<h:panelGrid>
								<h:outputText value="Nº Protocolo:" />
								<p:inputText size="10" id="txtIdProtocolo"
									value="#{atendFoneBacking.protSalvar.codProtocolo}"
									disabled="true" />
								<h:outputText value="Nome:" />
							</h:panelGrid>
							<h:panelGrid columns="3">
								<p:inputText size="50" required="true"
									value="#{atendFoneBacking.pessoaSalvar.nome}"
									requiredMessage="Informe o nome da pessoa atendida!" />
								<h:outputText value="Email:" />
								<p:inputText size="30"
									value="#{atendFoneBacking.pessoaSalvar.email}" />

							</h:panelGrid>

							<h:panelGrid>
								<h:outputText value="Tipo:" />
								<p:selectOneMenu value="#{atendFoneBacking.pessoaSalvar.tipo}"
									required="true" requiredMessage="Informe o tipo da pessoa!">
									<f:selectItem itemDisabled="true" itemLabel="Selecione" />
									<f:selectItem itemLabel="Aluno(a)" itemValue="Aluno" />
									<f:selectItem itemLabel="Ex-Aluno" itemValue="ExAluno" />
									<f:selectItem itemLabel="Comunidade" itemValue="Comunidade" />
									<f:selectItem itemLabel="Docente" itemValue="Docente" />

								</p:selectOneMenu>
								<h:outputText value="Telefone Fixo:" />
							</h:panelGrid>

							<h:panelGrid columns="3">
								<p:inputMask mask="(99) 9999-9999"
									value="#{atendFoneBacking.pessoaSalvar.telefoneFixo}" />
								<h:outputText value="Celular" />
								<p:inputMask mask="(99) 9999-9999"
									value="#{atendFoneBacking.pessoaSalvar.celular}" />
								<h:outputText value="Estado" />
							</h:panelGrid>

							<h:panelGrid columns="3">
								<p:selectOneMenu value="#{atendFoneBacking.estadoSelecionado}">
									<f:selectItem itemDisabled="true" itemLabel="Selecione" />
									<f:selectItems value="#{atendFoneBacking.listaEstado}" var="e"
										itemLabel="#{e.descricao} - #{e.sigla}" itemValue="#{e.id}" />
									<p:ajax listener="#{atendFoneBacking.criaListaCidade}"
										update="cidade" process="@this" />
								</p:selectOneMenu>
								<h:outputText value="Cidade" />
								<p:selectOneMenu id="cidade" required="true"
									requiredMessage="Informe a cidade da pessoa atendida!"
									value="#{atendFoneBacking.cidadeSelecionada}">
									<f:selectItem itemDisabled="true" itemLabel="Selecione" />
									<f:selectItems value="#{atendFoneBacking.listaCidade}" var="c"
										itemLabel="#{c.nome}" itemValue="#{c.id}" />
								</p:selectOneMenu>
							</h:panelGrid>

							<h:panelGrid>
								<h:outputText value="Interesse:" />
								<p:selectOneMenu
									value="#{atendFoneBacking.protSalvar.interesse}"
									required="true"
									requiredMessage="Informe o interesse da pessoa!">
									<f:selectItem itemDisabled="true" itemLabel="Selecione" />
									<f:selectItem itemLabel="Bolsa de Estudos"
										itemValue="Bolsa de Estudo" />
									<f:selectItem itemLabel="Duvídas" itemValue="Duvidas" />
									<f:selectItem itemLabel="Eventos" itemValue="Eventos" />
									<f:selectItem itemLabel="Informações" itemValue="Informacoes" />
									<f:selectItem itemLabel="Pós Graduação" itemValue="Pos" />
									<f:selectItem itemLabel="Reclamação" itemValue="Reclamacao" />
									<f:selectItem itemLabel="Vestibular" itemValue="Vestibular" />
									<f:selectItem itemLabel="Outros" itemValue="Outros" />
								</p:selectOneMenu>
								<h:outputText value="Assunto:" />
								<p:inputText size="60"
									value="#{atendFoneBacking.protSalvar.assunto}" required="true"
									requiredMessage="Informe o assunto!" />
							</h:panelGrid>
							<br />
							<p:tabView>
								<p:tab title="Descrição do Atendimento">
									<h:panelGrid>
										<h:outputText value="Descrição:" />
										<p:inputTextarea autoResize="true" rows="6" cols="90"
											required="true"
											value="#{atendFoneBacking.protSalvar.descricaoInteresse}"
											requiredMessage="Informe a descrição do atendimento!" />
									</h:panelGrid>
								</p:tab>
								<p:tab title="Justificativa do Atendente">
									<h:panelGrid>
										<h:outputText value="Descrição:" />
										<p:inputTextarea autoResize="true" rows="6" cols="90" />
									</h:panelGrid>
								</p:tab>
							</p:tabView>
							<br />
							<br />
							<div align="center">
								<h:panelGrid columns="2">
									<p:commandButton value="Finalizar Atendimento"
										icon="ui-icon-disk"
										actionListener="#{atendFoneBacking.finalizarAtendimento}"
										oncomplete="dlgAviso.show()" update=":formAviso" />
									<p:commandButton value="Pesquisar Cliente"
										icon="ui-icon-search" oncomplete="dlgPergunta.show()" />
								</h:panelGrid>
							</div>
							<br />
						</p:tab>
						<p:tab title="Agenda de Provas" disabled="true">
							<br />
							<h:panelGrid columns="4">
								<h:outputText value="Cód. Avaliação..:" />
								<p:inputText size="8" />
								<p:inputText size="35" disabled="true" />
								<p:commandButton icon="ui-icon-search" />
							</h:panelGrid>
							<h:panelGrid columns="2">
								<h:outputText value="Dia/Central/Sala:" />
								<p:inputText size="48" disabled="true" />
							</h:panelGrid>
							<br />
							<p:tabView>
								<p:tab title="Dados Pessoais">
									<h:panelGrid columns="6" cellspacing="5">
										<h:outputText value="Nome" />
										<p:inputText size="40" />
										<h:outputText value="Data Nasc." />
										<p:inputMask mask="99/99/9999" />
										<h:outputText value="CPF" />
										<p:inputMask mask="999.999.999-99" />
									</h:panelGrid>
									<h:panelGrid columns="6" cellspacing="10">
										<h:outputText value="RG:" />
										<p:inputText size="20" />
										<h:outputText value="Orgão Emissor:" />
										<p:inputText size="5" />
										<h:outputText value="UF" />
										<p:inputText size="5" />
									</h:panelGrid>
								</p:tab>

								<p:tab title="Cursos">
									<h:outputText value="Selecione as opções de cursos:" />
									<br />
									<br />
									<h:panelGrid columns="2">

										<h:outputText value="Opção 1:" />
										<p:selectOneMenu>
											<f:selectItem itemLabel="Selecione" itemDisabled="true" />
										</p:selectOneMenu>
										<h:outputText value="Opção 2:" />
										<p:selectOneMenu>
											<f:selectItem itemLabel="Selecione" itemDisabled="true" />
										</p:selectOneMenu>
										<h:outputText value="Opção 3:" />
										<p:selectOneMenu>
											<f:selectItem itemLabel="Selecione" itemDisabled="true" />
										</p:selectOneMenu>
									</h:panelGrid>
								</p:tab>
							</p:tabView>
						</p:tab>
					</p:tabView>
				</p:panel>
			</h:form>


			<p:dialog height="100" width="300" widgetVar="dlgAviso"
				showEffect="clip" appendToBody="true" modal="true"
				header="Nº Protocolo de Atendimento">
				<h:form id="formAviso">
					<br />
					<div align="center" id="t">
						<h3>Informe o Nº de Protocolo do Atendimento:</h3>
						<h2>
							<u id="txt">#{atendFoneBacking.codProtocolo}</u>
						</h2>
						<br />
					</div>
				</h:form>
			</p:dialog>

			<p:dialog height="100" width="300" widgetVar="dlgPergunta"
				showEffect="clip" appendToBody="true" modal="true" hideEffect="clip"
				header="?">
				<h:form id="formPergunta">
					<br />
					<div align="center" id="t">
						<h3>Deseja realizar novo atendimento?</h3>
						<br />
						<p:commandButton value="Sim"
							action="#{atendFoneBacking.telaPesquisaAtendimento}" />
						<p:commandButton value="Não" oncomplete="dlgPergunta.hide()" />
					</div>
				</h:form>
			</p:dialog>

		</ui:define>
	</ui:decorate>
</h:body>
</html>